/*

Author   : chaos

FileName : rec_fib.cpp

Date     : 09/08/17 21:22:14

*/
#include <iostream>
using namespace std;

int fib(int n);

int main(int argc ,char *argv[])
{
    for (int i = 0; i < 11; i++) {
        cout << "fib(" << i <<")=" << fib(i) << endl;
    }
    return 0;
}


int fib(int n){
    if (n==0)
        return 0 ;
    else if (n==1)
        return 1;
    else
        return fib(n-1)+fib(n-2);
}
